kmpkg_check_linkage(ONLY_STATIC_LIBRARY)

kmpkg_from_gitee(
    OUT_SOURCE_PATH SOURCE_PATH
    REPO kumo-hub/azure-macro-utils-c
    REF 5926caf4e42e98e730e6d03395788205649a3ada
    SHA512 97621f276657af976c4022c9600540ecae2287b3b386b9e097d661828a62c120348d354b3f86f3ef4d49f3c54830887662d3910ed5cec4a634949fa389b4ad55
    HEAD_REF master
    FILE_DISAMBIGUATOR 1
)

kmpkg_cmake_configure(
    SOURCE_PATH "${SOURCE_PATH}"
    OPTIONS
        -Drun_int_tests=OFF
)

kmpkg_cmake_install()

kmpkg_cmake_config_fixup(PACKAGE_NAME azure_macro_utils_c CONFIG_PATH "cmake")

file(COPY ${SOURCE_PATH}/inc/azure_macro_utils/macro_utils.h DESTINATION ${CURRENT_PACKAGES_DIR}/share/azure_macro_utils_c/include/azure_macro_utils)

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug)

configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/azure-macro-utils-c/copyright COPYONLY)

kmpkg_copy_pdbs()
